
/**
 * 调用返回键按钮的操作
 * @since 1.0.0
 * 
 * @example
 * 
 * giveBackAction().then(res => {})
 */
function giveBackAction(func) {
    return new Promise((resolve, reject) => {
        window.WebViewJavascriptBridge.registerHandler('giveBackAction', function(data, responseCallback) {
            var responseData = {
                status: 0
            }
            responseCallback(responseData)
            resolve(data)
        })
    })
}

export default giveBackAction